﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using VLUSM_BusinessLogic.DataTransferObjects;
using VLUSM_BusinessLogic;
using Microsoft.Practices.Unity;
using System.Collections.ObjectModel;

namespace VLUSM_Service 
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "StudentService" in code, svc and config file together.
    public class StudentService : IStudentService
    {
        IUnityContainer container;
        StudentManager manager;

        public StudentService()
        {
            container = new UnityContainer();
            manager = container.Resolve<StudentManager>();
        }
        #region CauLacBoThamGia Services
        public CauLacBoThamGiaDTO GetCauLacBoThamGiaByID(int IDFilter)
        {
            return manager.GetCauLacBoThamGiaByID(IDFilter);
        }

        public ObservableCollection<CauLacBoThamGiaDTO> GetCauLacBoThamGiaBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetCauLacBoThamGiaBySinhVienID(SinhVienIDFilter);
        }

        public void SaveCauLacBoThamGia(CauLacBoThamGiaDTO objdto)
        {
            manager.SaveCauLacBoThamGia(objdto);
        }

        public void SaveCauLacBoThamGiaList(ObservableCollection<CauLacBoThamGiaDTO> dtolist)
        {
            manager.SaveCauLacBoThamGiaList(dtolist);
        }

        public void RemoveCauLacBoThamGia(CauLacBoThamGiaDTO objdto)
        {
            manager.RemoveCauLacBoThamGia(objdto);
        }

        public void RemoveCauLacBoThamGia(int IDFilter)
        {
            manager.RemoveCauLacBoThamGiaByID(IDFilter);
        }
        #endregion

        #region HocBong Services
        public HocBongDTO GetHocBongByID(int IDFilter)
        {
            return manager.GetHocBongByID(IDFilter);
        }

        public ObservableCollection<HocBongDTO> GetHocBongBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetHocBongBySinhVienID(SinhVienIDFilter);
        }

        public void SaveHocBong(HocBongDTO objdto)
        {
            manager.SaveHocBong(objdto);
        }

        public void SaveHocBongList(ObservableCollection<HocBongDTO> dtolist)
        {
            manager.SaveHocBongList(dtolist);
        }

        public void RemoveHocBong(HocBongDTO objdto)
        {
            manager.RemoveHocBong(objdto);
        }

        public void RemoveHocBong(int IDFilter)
        {
            manager.RemoveHocBongByID(IDFilter);
        }
        #endregion

        #region HoSoDaNop Services
        public HoSoDaNopDTO GetHoSoDaNopByID(int IDFilter)
        {
            return manager.GetHoSoDaNopByID(IDFilter);
        }

        public ObservableCollection<HoSoDaNopDTO> GetHoSoDaNopBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetHoSoDaNopBySinhVienID(SinhVienIDFilter);
        }


        public void SetHoSoDaNopListForSinhVien(int SinhVienID, ObservableCollection<HoSoDaNopDTO> listDTO)
        {
            manager.SetHoSoDaNopListForSinhVien(SinhVienID, listDTO);
        }

        public void UnsetHoSoDaNopListForSinhVien(int SinhVienID, ObservableCollection<HoSoDaNopDTO> listDTO) {
            manager.UnsetHoSoDaNopListForSinhVien(SinhVienID, listDTO);
        }
        #endregion

        #region KhenThuong Services
        public KhenThuongDTO GetKhenThuongByID(int IDFilter)
        {
            return manager.GetKhenThuongByID(IDFilter);
        }

        public ObservableCollection<KhenThuongDTO> GetKhenThuongBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetKhenThuongBySinhVienID(SinhVienIDFilter);
        }

        public void SaveKhenThuong(KhenThuongDTO objdto)
        {
            manager.SaveKhenThuong(objdto);
        }

        public void SaveKhenThuongList(ObservableCollection<KhenThuongDTO> dtolist)
        {
            manager.SaveKhenThuongList(dtolist);
        }

        public void RemoveKhenThuong(KhenThuongDTO objdto)
        {
            manager.RemoveKhenThuong(objdto);
        }

        public void RemoveKhenThuong(int IDFilter)
        {
            manager.RemoveKhenThuongByID(IDFilter);
        }
        #endregion

        #region KyLuat Services
        public KyLuatDTO GetKyLuatByID(int IDFilter)
        {
            return manager.GetKyLuatByID(IDFilter);
        }

        public ObservableCollection<KyLuatDTO> GetKyLuatBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetKyLuatBySinhVienID(SinhVienIDFilter);
        }

        public void SaveKyLuat(KyLuatDTO objdto)
        {
            manager.SaveKyLuat(objdto);
        }

        public void SaveKyLuatList(ObservableCollection<KyLuatDTO> dtolist)
        {
            manager.SaveKyLuatList(dtolist);
        }

        public void RemoveKyLuat(KyLuatDTO objdto)
        {
            manager.RemoveKyLuat(objdto);
        }

        public void RemoveKyLuat(int IDFilter)
        {
            manager.RemoveKyLuatByID(IDFilter);
        }
        #endregion

        #region HoatDongDoanTheThamGia Methods
        public HoatDongDoanTheThamGiaDTO GetHoatDongDoanTheThamGiaByID(int IDFilter)
        {
            return manager.GetHoatDongDoanTheThamGiaByID(IDFilter);
        }

        public ObservableCollection<HoatDongDoanTheThamGiaDTO> GetHoatDongDoanTheThamGiaBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetHoatDongDoanTheThamGiaBySinhVienID(SinhVienIDFilter);
        }

        public void SaveHoatDongDoanTheThamGia(HoatDongDoanTheThamGiaDTO objdto)
        {
            manager.SaveHoatDongDoanTheThamGia(objdto);
        }

        public void SaveHoatDongDoanTheThamGiaList(ObservableCollection<HoatDongDoanTheThamGiaDTO> dtolist)
        {
            manager.SaveHoatDongDoanTheThamGiaList(dtolist);
        }

        public void RemoveHoatDongDoanTheThamGia(HoatDongDoanTheThamGiaDTO objdto)
        {
            manager.RemoveHoatDongDoanTheThamGia(objdto);
        }

        public void RemoveHoatDongDoanTheThamGiaByID(int IDFilter)
        {
            manager.RemoveHoatDongDoanTheThamGiaByID(IDFilter);
        }
        #endregion

        #region NghienCuuKhoaHoc Services
        public NghienCuuKhoaHocDTO GetNghienCuuKhoaHocByID(int IDFilter)
        {
            return manager.GetNghienCuuKhoaHocByID(IDFilter);
        }

        public ObservableCollection<NghienCuuKhoaHocDTO> GetNghienCuuKhoaHocBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetNghienCuuKhoaHocBySinhVienID(SinhVienIDFilter);
        }

        public void SaveNghienCuuKhoaHoc(NghienCuuKhoaHocDTO objdto)
        {
            manager.SaveNghienCuuKhoaHoc(objdto);
        }

        public void SaveNghienCuuKhoaHocList(ObservableCollection<NghienCuuKhoaHocDTO> dtolist)
        {
            manager.SaveNghienCuuKhoaHocList(dtolist);
        }

        public void RemoveNghienCuuKhoaHoc(NghienCuuKhoaHocDTO objdto)
        {
            manager.RemoveNghienCuuKhoaHoc(objdto);
        }

        public void RemoveNghienCuuKhoaHoc(int IDFilter)
        {
            manager.RemoveNghienCuuKhoaHocByID(IDFilter);
        }
        #endregion

        #region NhatKy Services
        public NhatKyDTO GetNhatKyByID(int IDFilter)
        {
            return manager.GetNhatKyByID(IDFilter);
        }

        public ObservableCollection<NhatKyDTO> GetNhatKyBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetNhatKyBySinhVienID(SinhVienIDFilter);
        }

        public void SaveNhatKy(NhatKyDTO objdto)
        {
            manager.SaveNhatKy(objdto);
        }

        public void SaveNhatKyList(ObservableCollection<NhatKyDTO> dtolist)
        {
            manager.SaveNhatKyList(dtolist);
        }

        public void RemoveNhatKy(NhatKyDTO objdto)
        {
            manager.RemoveNhatKy(objdto);
        }

        public void RemoveNhatKy(int IDFilter)
        {
            manager.RemoveNhatKyByID(IDFilter);
        }
        #endregion

        #region SinhVien Services
        public ObservableCollection<SinhVienBasicDTO> GetSinhVienList()
        {
            return manager.GetSinhVienList();
        }
        public SinhVienBasicDTO GetSinhVienByID(int IDFilter)
        {
            return manager.GetSinhVienByID(IDFilter);
        }
        public ObservableCollection<SinhVienBasicDTO> SearchSinhVien(string Query)
        {
            return manager.SearchSinhVien(Query);
        }

        public ObservableCollection<SinhVienBasicDTO> SearchSinhVienByDonVi(string Query, int DonViID)
        {
            return manager.SearchSinhVienByDonVi(Query, DonViID);
        }

        public ObservableCollection<SinhVienBasicDTO> SearchSinhVienByLop(string Query, int LopID)
        {
            return manager.SearchSinhVienByLop(Query, LopID);
        }
        public ObservableCollection<SinhVienBasicDTO> GetSinhVienByDonViID(int DonViIDFilter)
        {
            return manager.GetSinhVienByDonViID(DonViIDFilter);
        }
        public ObservableCollection<SinhVienBasicDTO> GetSinhVienByLopID(int LopIDFilter)
        {
            return manager.GetSinhVienByLopID(LopIDFilter);
        }
        public ObservableCollection<SinhVienBasicDTO> GetSinhVienByTenDonVi(string TenDonViFilter)
        {
            return manager.GetSinhVienByTenDonVi(TenDonViFilter);
        }
        public ObservableCollection<SinhVienBasicDTO> GetSinhVienByTenLop(string TenLopFilter)
        {
            return manager.GetSinhVienByTenLop(TenLopFilter);
        }
        public SinhVienDetailDTO GetSinhVienDetailByID(int IDFilter) 
        {
            return manager.GetSinhVienDetailByID(IDFilter);
        }
        public SinhVienDetailDTO GetSinhVienDetailByMa(string MaFilter)
        {
            return manager.GetSinhVienDetailByMa(MaFilter);
        }
        public SinhVienDetailDTO GetSinhVienDetailByTen(string TenFilter)
        {
            return manager.GetSinhVienDetailByTen(TenFilter);
        }
        public void SaveSinhVien(SinhVienDetailDTO objdto)
        {
            manager.SaveSinhVien(objdto);
        }

        public void RemoveSinhVien(SinhVienDetailDTO objdto)
        {
            manager.RemoveSinhVien(objdto);
        }

        public void RemoveSinhVien(int IDFilter)
        {
            manager.RemoveSinhVienByID(IDFilter);
        }
        #endregion

        #region ThamGiaOlympic Services
        public ThamGiaOlympicDTO GetThamGiaOlympicByID(int IDFilter)
        {
            return manager.GetThamGiaOlympicByID(IDFilter);
        }

        public ObservableCollection<ThamGiaOlympicDTO> GetThamGiaOlympicBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetThamGiaOlympicBySinhVienID(SinhVienIDFilter);
        }

        public void SaveThamGiaOlympic(ThamGiaOlympicDTO objdto)
        {
            manager.SaveThamGiaOlympic(objdto);
        }

        public void SaveThamGiaOlympicList(ObservableCollection<ThamGiaOlympicDTO> dtolist)
        {
            manager.SaveThamGiaOlympicList(dtolist);
        }

        public void RemoveThamGiaOlympic(ThamGiaOlympicDTO objdto)
        {
            manager.RemoveThamGiaOlympic(objdto);
        }

        public void RemoveThamGiaOlympic(int IDFilter)
        {
            manager.RemoveThamGiaOlympicByID(IDFilter);
        }
        #endregion

        #region ThayDoiTrongQuaTrinhHoc Methods
        public ThayDoiTrongQuaTrinhHocDTO GetThayDoiTrongQuaTrinhHocByID(int IDFilter)
        {
            return manager.GetThayDoiTrongQuaTrinhHocByID(IDFilter);
        }

        public ObservableCollection<ThayDoiTrongQuaTrinhHocDTO> GetThayDoiTrongQuaTrinhHocBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetThayDoiTrongQuaTrinhHocBySinhVienID(SinhVienIDFilter);
        }

        public void SaveThayDoiTrongQuaTrinhHoc(ThayDoiTrongQuaTrinhHocDTO objdto)
        {
            manager.SaveThayDoiTrongQuaTrinhHoc(objdto);   
        }

        public void SaveThayDoiTrongQuaTrinhHocList(ObservableCollection<ThayDoiTrongQuaTrinhHocDTO> dtolist)
        {
            manager.SaveThayDoiTrongQuaTrinhHocList(dtolist);
        }

        public void RemoveThayDoiTrongQuaTrinhHoc(ThayDoiTrongQuaTrinhHocDTO objdto)
        {
            manager.RemoveThayDoiTrongQuaTrinhHoc(objdto);
        }

        public void RemoveThayDoiTrongQuaTrinhHocByID(int IDFilter)
        {
            manager.RemoveThayDoiTrongQuaTrinhHocByID(IDFilter);
        }
        #endregion

        #region VanBangDuocNhan Services
        public VanBangDuocNhanDTO GetVanBangDuocNhanByID(int IDFilter)
        {
            return manager.GetVanBangDuocNhanByID(IDFilter);
        }

        public ObservableCollection<VanBangDuocNhanDTO> GetVanBangDuocNhanBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetVanBangDuocNhanBySinhVienID(SinhVienIDFilter);
        }

        public void SaveVanBangDuocNhan(VanBangDuocNhanDTO objdto)
        {
            manager.SaveVanBangDuocNhan(objdto);
        }

        public void SaveVanBangDuocNhanList(ObservableCollection<VanBangDuocNhanDTO> dtolist)
        {
            manager.SaveVanBangDuocNhanList(dtolist);
        }

        public void RemoveVanBangDuocNhan(VanBangDuocNhanDTO objdto)
        {
            manager.RemoveVanBangDuocNhan(objdto);
        }

        public void RemoveVanBangDuocNhan(int IDFilter)
        {
            manager.RemoveVanBangDuocNhanByID(IDFilter);
        }
        #endregion
    }
}
